SHTC3 based on I2C

Vivado Project

The SHTC3 is a temperature and humidity sensor with an I2C interface.

In the development board's schematic, both the SHTC3 and the E2PROM are on the same I2C bus, so the E2PROM Vivado project can be used directly.

Create Vitis Application Project

If the .xsa file has been modified, update the platform project in Vitis. Right-click the platform project, click 'Update Hardware Specification', and select the .xsa file path. When the dialog box appears, click OK to confirm the update was successful.

 

VeryCapture_20250618121412

VeryCapture_20250618121446

VeryCapture_20250618121501

Next, click File-->new-->Application Project:

image-20250811173217378

Then, select an empty .c project:

VeryCapture_20250618121953

Simply add the .c file.

Compile and Debug

After the project compiles successfully, connect the development board's JTAG port to the computer with a Type-C USB cable. Use another Type-C USB cable to connect the board's PS UART to the computer.

Open the serial terminal tool MobaXterm on your computer and connect to the development board's PS UART.

image-20250623121938035

Enter debug mode in Vitis: Under 'Debug As', select the first option. Run at full speed, and you can view the debug information through the serial port.

The debug output is as follows:

VeryCapture_20250618165423